package com.xcx.portal.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.xcx.common.services.BoxService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 小程序盒子controller
 *
 * @author 唐邱勇
 * @date 2018年7月13日 下午8:32:17
 */
@RestController
@RequestMapping(value = "/xcx/box")
public class BoxController {

    @Reference
    private BoxService boxService;


    /**
     * 查询盒子展示列表
     *
     * @param reqStr
     * @return
     */
    @RequestMapping(value = "/queryBoxList", produces = {"application/json;chart=UTF-8"})
    @ResponseBody
    public String queryBoxList(@RequestBody String reqStr) {
        return boxService.queryBoxList(reqStr);
    }


    /**
     * 保存什么地方跳到盒子的
     *
     * @param reqStr
     * @return
     */
    @RequestMapping(value = "/saveScenceLog", produces = {"application/json;chart=UTF-8"})
    @ResponseBody
    public String saveScenceLog(@RequestBody String reqStr) {
        return boxService.saveScenceLog(reqStr);
    }


    /**
     * 是否显示盒子入口
     *
     * @param reqStr
     * @return
     */
    @RequestMapping(value = "/isShowBox", produces = {"application/json;chart=UTF-8"})
    @ResponseBody
    public String isShowBox(@RequestBody String reqStr) {
        return boxService.isShowBox(reqStr);
    }

    /**
     * 查询分享图片列表
     *
     * @param reqStr
     * @return
     */
    @RequestMapping(value = "/querySharePhoto", produces = {"application/json;chart=UTF-8"})
    @ResponseBody
    public String querySharePhoto(@RequestBody String reqStr) {
        return boxService.querySharePhoto(reqStr);
    }



}
